defineTest(genenv) {
IN_PWD_WIN=$$replace(IN_PWD,/,\\)
OUT_PWD_WIN=$$replace(OUT_PWD,/,\\)
####ENV_FILE=$$dirname(IN_PWD_WIN)\\$${TARGET}.env
ENV_FILE=$$dirname(OUT_PWD_WIN)\\$${TARGET}.env
PRO_FILE=$${IN_PWD_WIN}\\$${TARGET}.pro
system(echo $${LITERAL_HASH} $${ENV_FILE} > $${ENV_FILE})
system(echo $${LITERAL_HASH} generated from $${PRO_FILE} >> $${ENV_FILE})
system(echo CONFIG(debug, debug^|release):DESTDIR = debug >> $${ENV_FILE})
system(echo else:DESTDIR = release >> $${ENV_FILE})
system(echo INCLUDEPATH += $${IN_PWD_WIN} >> $${ENV_FILE})
system(echo QMAKE_LFLAGS += -L$${OUT_PWD_WIN}\\\\\$\${DESTDIR} >> $${ENV_FILE})
system(echo LIBS += -l$${TARGET} >> $${ENV_FILE})
system(echo DEPENDPATH += $${IN_PWD_WIN} >> $${ENV_FILE})
system(echo POST_TARGETDEPS += $${OUT_PWD_WIN}\\\\\$\${DESTDIR}\\lib$${TARGET}.a >> $${ENV_FILE})
COPY_FROM = $${OUT_PWD_WIN}\\\\\$\${DESTDIR}\\$${TARGET}.dll
COPY_TO   = \$\$replace(OUT_PWD,/,\\)\\\\\$\${DESTDIR}
system(echo QMAKE_PRE_LINK += xcopy /Y /F $${COPY_FROM} $${COPY_TO} ^& >> $${ENV_FILE})
return(true)
}

defineTest(genenv_for_exe) {
IN_PWD_WIN=$$replace(IN_PWD,/,\\)
OUT_PWD_WIN=$$replace(OUT_PWD,/,\\)
ENV_FILE=$$dirname(OUT_PWD_WIN)\\$${TARGET}.env
PRO_FILE=$${IN_PWD_WIN}\\$${TARGET}.pro
system(echo $${LITERAL_HASH} $${ENV_FILE} > $${ENV_FILE})
system(echo $${LITERAL_HASH} generated from $${PRO_FILE} >> $${ENV_FILE})
system(echo CONFIG(debug, debug^|release):DESTDIR = debug >> $${ENV_FILE})
system(echo else:DESTDIR = release >> $${ENV_FILE})
##system(echo INCLUDEPATH += $${IN_PWD_WIN} >> $${ENV_FILE})
##system(echo QMAKE_LFLAGS += -L$${OUT_PWD_WIN}\\\\\$\${DESTDIR} >> $${ENV_FILE})
##system(echo LIBS += -l$${TARGET} >> $${ENV_FILE})
##system(echo DEPENDPATH += $${IN_PWD_WIN} >> $${ENV_FILE})
system(echo POST_TARGETDEPS += $${OUT_PWD_WIN}\\\\\$\${DESTDIR}\\$${TARGET}.exe >> $${ENV_FILE})
COPY_FROM = $${OUT_PWD_WIN}\\\\\$\${DESTDIR}\\$${TARGET}.exe
COPY_TO   = \$\$replace(OUT_PWD,/,\\)\\\\\$\${DESTDIR}
system(echo QMAKE_PRE_LINK += xcopy /Y /F $${COPY_FROM} $${COPY_TO} ^& >> $${ENV_FILE})
return(true)
}

